/**
 * SIX VULN - http://code.google.com/p/six-vuln/
 * Copyright (C) 2006
 *   National Institute of Advanced Industrial Science and Technology (AIST)
 *   Registration Number: H20PRO-863
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package jp.go.aist.six.vuln.model.scap.vulnerability;



/**
 *
 * @author	Akihito Nakamura, AIST
 * @version $Id: OsvdbExtensionType.java 529 2013-04-15 07:08:54Z nakamura5akihito@gmail.com $
 */
public class OsvdbExtensionType
{

    //{1..1}
    private AssociatedExploitLocationType  exploitLocation;



    /**
     *
     */
    public OsvdbExtensionType()
    {
    }



    /**
     */
    public AssociatedExploitLocationType getExploitLocation()
    {
        return exploitLocation;
    }


    public void setExploitLocation(
                    final AssociatedExploitLocationType exploitLocation
                    )
    {
        this.exploitLocation = exploitLocation;
    }



    //**************************************************************
    //  java.lang.Object
    //**************************************************************

    @Override
    public int hashCode()
    {
        final int  prime = 37;
        int  result = 17;

        AssociatedExploitLocationType  exploitLocation = getExploitLocation();
        result = prime * result + ((exploitLocation == null) ? 0 : exploitLocation.hashCode());

        return result;
    }



    @Override
    public boolean equals(
                    final Object obj
                    )
    {
        if (this == obj) {
            return true;
        }

        if (!(obj instanceof OsvdbExtensionType)) {
            return false;
        }

        if (super.equals( obj )) {
            OsvdbExtensionType  other = OsvdbExtensionType.class.cast( obj );
            AssociatedExploitLocationType  this_exploitLocation = this.getExploitLocation();
            AssociatedExploitLocationType  other_exploitLocation = other.getExploitLocation();
            if (this_exploitLocation == other_exploitLocation
                            ||  (this_exploitLocation != null  &&  this_exploitLocation.equals( other_exploitLocation ))) {
                return true;
            }
        }

        return false;
    }



    @Override
    public String toString()
    {
        return "OsvdbExtensionType[exploitLocation=" + getExploitLocation()
                + "]";
    }

}
//OsvdbExtensionType
